<div class="modal fade" id="flagScriptModal">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
        <h4 class="modal-title">Flag {{script.fullName}}</h4>
      </div>
      <div class="modal-body">
        <p>Are you sure you want to flag this script for potential inspection by a Moderator?</p>
      </div>
      <div class="modal-footer">
        <form action="{{{script.scriptFlagPageUrl}}}" method="post" enctype="multipart/form-data">
          <input type="text" class="form-control" name="reason" placeholder="Reason for moderation inspection.">
          <button type="button" class="btn btn-default" data-dismiss="modal"><i class="fa fa-fw fa-close"></i> Close</button>
          <input type="hidden" name="flag" value="true">
          <button type="submit" class="btn btn-danger{{^canFlag}} disabled{{/canFlag}}"><i class="fa fa-fw fa-flag"></i> Flag</button>
        </form>
      </div>
    </div>
  </div>
</div>
{{#script.canDonate}}
<div class="modal fade" id="donateScriptModal">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
        <h4 class="modal-title"><i class="fa fa-fw fa-money"></i> Donate for {{script.fullName}}</h4>
      </div>
      <div class="modal-body">
        <p>Are you sure you want to go to an external site to donate a monetary value?</p>
        <div class="alert alert-warning" role="alert">
          <i class="fa fa-fw fa-exclamation-triangle"></i> WARNING: Some countries laws may supersede the payment processors policy such as the GDPR and PayPal. While it is highly appreciated to donate, please check with your countries privacy and identity laws regarding privacy of information first. Use at your utmost discretion.
        </div>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal"><i class="fa fa-fw fa-close"></i> Close</button>
        {{#script.contribution}}
        <a rel="external noreferrer noopener nofollow" referrerpolicy="same-origin" href="{{url}}" class="btn btn-danger" role="button" title="Send a monetary Thank You!">Donate</a>
        {{/script.contribution}}
      </div>
    </div>
  </div>
</div>
{{/script.canDonate}}
{{#authorTools}}
<div class="modal fade" id="deleteScriptModal">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
        <h4 class="modal-title"><i class="fa fa-fw fa-trash-o"></i> Delete {{script.fullName}}</h4>
      </div>
      <div class="modal-body">
        <p>Are you sure you want to delete this script? You cannot undo this.</p>
      </div>
      <div class="modal-footer">
        <form action="{{{script.scriptEditMetadataPageUrl}}}" method="post">
          <button type="button" class="btn btn-default" data-dismiss="modal"><i class="fa fa-fw fa-close"></i> Close</button>
          <input type="hidden" name="remove" value="true">
          <button type="submit" class="btn btn-danger">Delete</button>
        </form>
      </div>
    </div>
  </div>
</div>
{{/authorTools}}
{{#modTools}}
<div class="modal fade" id="removeScriptModal">
  <div class="modal-dialog">
    <div class="modal-content">
      <div class="modal-header">
        <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
        <h4 class="modal-title">Remove {{script.fullName}}</h4>
      </div>
      <div class="modal-body">
        <p>Are you sure you want to remove this script? You cannot undo this.</p>
      </div>
      <div class="modal-footer">
        <form action="{{{script.scriptRemovePageUrl}}}" method="post" enctype="multipart/form-data">
          <input type="text" class="form-control" name="reason" placeholder="Reason for removal."{{#modTools.removeReasons}} list="reasons"{{/modTools.removeReasons}}>
          {{#modTools.hasRemoveReasons}}
          <datalist id="reasons">
            {{#modTools.removeReasons}}<option value="{{{name}}}"></option>{{/modTools.removeReasons}}
          </datalist>
          {{/modTools.hasRemoveReasons}}
          <br />
          <button type="button" class="btn btn-default" data-dismiss="modal"><i class="fa fa-fw fa-close"></i> Close</button>
          <input type="hidden" name="remove" value="true">
          <button type="submit" class="btn btn-danger"><i class="fa fa-fw fa-ban"></i> Remove</button>
        </form>
      </div>
    </div>
  </div>
</div>
{{/modTools}}
